package com.mlc.mlcitems.particle;

import org.bukkit.Bukkit;
import org.bukkit.Particle;
import org.bukkit.entity.ArmorStand;
import org.bukkit.entity.Entity;

import static com.mlc.mlcitems.Mlcitems.instance;

public class arrowparticle {
    public static void spawnDRIPPING_LAVA(Entity entity){
        Bukkit.getScheduler().scheduleSyncRepeatingTask(instance,() ->{
            if (entity.isDead() || !entity.isValid()) {
                return;
            }
            Particle particle = Particle.DRIPPING_LAVA;
            entity.getWorld().spawnParticle(particle,entity.getLocation(),1);
        },0L,0L);
    }

    public static void spawnLAVA(Entity entity){
        Bukkit.getScheduler().scheduleSyncRepeatingTask(instance,() ->{
            if (entity.isDead() || !entity.isValid()) {
                return;
            }
            Particle particle = Particle.LAVA;
            entity.getWorld().spawnParticle(particle,entity.getLocation(),1);
        },0L,5L);
    }
}
